package com.liuxin.zhiyuan.shujuzhongxin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liuxin.zhiyuan.shujuzhongxin.domain.dto.RecruitMajorDTO;
import com.liuxin.zhiyuan.shujuzhongxin.domain.po.RecruitMajorInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.Date;
import java.util.List;

/**
 * 招生专业信息表（存储院校、专业、选科、招生计划等信息）
 * 
 * @author zsl
 * @email 1301966496@qq.com
 * @date 2025-11-21 21:46:30
 */
@Mapper
public interface RecruitMajorInfoMapper extends BaseMapper<RecruitMajorInfoEntity> {
    /**
     * 批量更新预测排名和分数
     */
    @Update("UPDATE lxzy_recruit_major_info SET yc_paiming = #{ycPaiming}, yc_score = #{ycScore}, processed_time = #{processedTime} WHERE id = #{id}")
    int updatePrediction(@Param("id") Long id,
                         @Param("ycPaiming") Integer ycPaiming,
                         @Param("ycScore") Integer ycScore,
                         @Param("processedTime") Date processedTime);

    List<RecruitMajorDTO> queryRecruitMajorList(
            @Param("schoolId") Integer schoolId,
            @Param("nature") String nature,
            @Param("schoolCode") String schoolCode);
}
